Domain is passed as a REGEX pattern, not a literal string. - #12937
Open
daviftorres wants to merge 3 commits into
Open
Domain is passed as a REGEX pattern, not a literal string.#12937daviftorres wants to merge 3 commits into
daviftorres wants to merge 3 commits into
Conversation
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This change ensures consistency with how paths are parsed when updating a domain path.
The modified line was passing the domain name as a literal string, but it is actually interpreted as a regular expression internally.
I couldn’t find a way to exploit this issue, but it could still cause data corruption if a domain name accidentally contains regex metacharacters.
Note that this same technique is already used in a similar situation on line 1118.
A common example is when an organization uses its DNS name as the "domain" (tenant), like
company.com.In this case, the
.(dot) is treated as a regex wildcard, meaning it can match any character...Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?
This fix was not tested. I am not a Java developer, and I have no skill for such a thing.
How did you try to break this feature and the system with this change?
I could trigger, but I could not exploit this bug.